<?php
require_once('./cherylib.php');
require_once('../src/scottlib.php');

// connecting - will throw an Exception on failure
connect(':/tmp/mysql.sock', 'root', 'password', 'mysql');

// comparing db()->val($string) to val($string), should be the same
$version = db()->val('SELECT @@VERSION');
assert_equals(val('SELECT @@VERSION'), $version);

// pass-through prepare: no parameters
assert_equals('SELECT @@VERSION', prepare('SELECT @@VERSION'));
assert_equals(val('SELECT @@VERSION'), val(prepare('SELECT %p', '@@VERSION')));
